<%@ include file="/WEB-INF/jsp/include/head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
	<%@ include file="/WEB-INF/jsp/include/title.jsp" %>
	<%@ include file="/WEB-INF/jsp/include/common_css.jsp" %>
	<%@ include file="/WEB-INF/jsp/include/common_script.jsp" %>	
	<script type="text/javascript">
	//<![CDATA[
	function temp() {
		var p = $("#username").val() + "___" + "SAGA";
		$("#j_username").attr("value", p);
		$("#frmLogin").submit();
	}
	
//	$(document).ready(defaultLogin);	
	//]]>
	</script>
</head>
<body>
<%@ include file="/WEB-INF/jsp/include/top.jsp" %>login.do
    <form:form id="frmLogin" method="post" action="../j_spring_security_check" onsubmit="temp();">
	<input id="loginType" name="loginType" type="hidden" value="USER" />
	<input id="pid" type="hidden" name="pid" value="SAGA" />
	<input id="j_username" type="hidden" name="j_username" />
	<c:if test="${not empty param.login_error}">
	<div id="msg" class="alertMsg">
		<font color="red"> Your login attempt was not successful, try again.
		<br />
		Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />. </font>
	</div>
	</c:if>
	<div id="login">
		<spring:message code="user.loginId"/> : <input id="username" type='text' name='username' class="inputText" value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>' />
		<spring:message code="user.password"/> : <input id="j_password" type="password" name="j_password" class="inputText" />
		<input type="submit" name="loginButton" value="<spring:message code="button.login"/>" class="button" />
	</div>
    </form:form>
<%@ include file="/WEB-INF/jsp/include/footer.jsp" %>
</body>	
</html>